Skip to content

Pass callback to get provider options to provider_v26 constructor#244

Merged
sciascid merged 1 commit intomasterfrom
provider_options_cb
Jul 9, 2025
Merged

Pass callback to get provider options to provider_v26 constructor#244
sciascid merged 1 commit intomasterfrom
provider_options_cb

Conversation

@temeo
Copy link
Contributor

@temeo temeo commented Feb 19, 2025

Passing a callback allows constructing the options string using
config service after loading the provider but before initializing
the provider.

@temeo temeo force-pushed the provider_options_cb branch from d9b44fa to 1b7acab Compare February 19, 2025 11:48
@sciascid sciascid force-pushed the provider_options_cb branch from a2c1a51 to 9349f85 Compare February 28, 2025 17:28
@sciascid sciascid force-pushed the provider_options_cb branch 2 times, most recently from a8222d8 to db41d67 Compare April 4, 2025 12:40
@sciascid sciascid force-pushed the provider_options_cb branch 2 times, most recently from de9935c to c8f25d4 Compare May 12, 2025 11:36
wsrep_status_t ret = wsrep_config_service_v2::service.get_parameters(
wsrep, &wsrep_config_service_v2::service_callback, options);

config_service_v2_deinit(wsrep->dlh);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is config service v2 deinitialized immediately after getting parameters? Is there some reason which would require explanation in comments?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function config_service_v1_fetch() provides this convenience that initializes the service, invokes it, and then de-initializes it. The config service is used only one time. Same happens with v1.

@sciascid sciascid force-pushed the provider_options_cb branch from 91cc211 to b491197 Compare July 1, 2025 12:01
codership-jenkins

This comment was marked as duplicate.

Copy link
Contributor Author

@temeo temeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Please squash into one commit and refer MDEV-37026 in commit message.

Passing a callback allows constructing the options string using
config service after loading the provider but before initializing
the provider. This way it is possible get options which are given
at DBMS startup, in command line or config file.
@sciascid sciascid force-pushed the provider_options_cb branch from b491197 to 3965d83 Compare July 9, 2025 12:55
@sciascid sciascid merged commit 3965d83 into master Jul 9, 2025
26 checks passed
@sciascid sciascid deleted the provider_options_cb branch July 9, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants